<template>
  <div class="bg">
    <div class="top">
      <van-icon @click="change" class="arrow-left" name="arrow-left" color="#ccc" size="16px" />
      <span>课程明细</span>
    </div>
    <div class="bottom">
      <p>我的课程</p>
      <div class="wrap">
        <div class="left">
          <img src="../assets/img/xunlian.webp" alt />
        </div>
        <div class="right">
          <h3>哈佛训练营P1</h3>
          <p>
            <img src="../assets/img/zuanshi.webp" alt />
            课程有效期：永久有效
          </p>
        </div>
        <img class="arrow" src="../assets/img/arrow.webp" alt />
      </div>
    </div>
    <div class="wrap">
      <div class="left">
        <img src="../assets/img/xunlian.webp" alt />
      </div>
      <div class="right">
        <h3>哈佛训练营P2</h3>
        <p>
          <img src="../assets/img/zuanshi.webp" alt />
          课程有效期：永久有效
        </p>
      </div>
      <img class="arrow" src="../assets/img/arrow.webp" alt />
    </div>
    <div class="wrap">
      <div class="left">
        <img src="../assets/img/xunlian.webp" alt />
      </div>
      <div class="right">
        <h3>哈佛训练营P3</h3>
        <p>
          <img src="../assets/img/zuanshi.webp" alt />
          课程有效期：永久有效
        </p>
      </div>
      <img class="arrow" src="../assets/img/arrow.webp" alt />
    </div>
    <div class="wrap">
      <div class="left">
        <img src="../assets/img/xunlian.webp" alt />
      </div>
      <div class="right">
        <h3>哈佛训练营P4</h3>
        <p>
          <img src="../assets/img/zuanshi.webp" alt />
          课程有效期：永久有效
        </p>
      </div>
      <img class="arrow" src="../assets/img/arrow.webp" alt />
    </div>
  </div>
</template>

<script>
import { useRouter } from "vue-router";

export default {
  setup() {
    const router = useRouter();
    const change = () => {
      router.push("/home/mine");
    };
    return {
      change,
      router
    };
  }
};
</script>
<style lang="scss" scoped>
.bg {
  width: 100%;
  height: 100vh;
  background: #f5f5f5;
}
.top {
  background: #fff;
  padding-bottom: 10px;
}
.bottom {
  overflow: hidden;
}
.arrow-left {
  margin-top: 24px;
  margin-left: 13px;
  float: left;
  font-weight: 600;
}
span {
  display: inline-block;
  margin-left: -24px;
  margin-top: 20px;
  font-size: 16px;
  font-weight: 400;
}
p {
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  margin-left: 13px;
  line-height: 10px;
}
.wrap {
  position: relative;
  padding: 15px 10px;
  width: 325px;
  height: 60px;
  border: 1px solid #ccc;
  background: #fff;
  text-align: left;
  margin: 20px auto 0;
  border-radius: 8px;
  .left {
    float: left;
    width: 50px;
    height: 50px;
    margin-top: 5px;
    margin-right: 15px;
    img {
      width: 100%;
      height: 100%;
    }
  }
  .right {
    h3 {
      font-size: 16px;
      line-height: 0;
      margin-bottom: 23px;
    }
    p {
      font-size: 12px;
      line-height: 0;
      font-weight: normal;
      color: #ccc;
      img {
        width: 15px;
        height: 15px;
        vertical-align: middle;
      }
    }
  }
  .arrow {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    font-weight: normal;
  }
}
</style>
